Skip to content

Typed retirement path for test_migration_debt (model + guard union + first DeleteRedundant) - #6261

Merged
briansrls merged 5 commits into
mainfrom
session/warm-ferret-337
Jul 5, 2026
Merged

briansrls merged 5 commits into
mainfrom
session/warm-ferret-337

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Typed retirement path for v2.lens.test_migration_debt

First deliverable of the test-triage lane (operator 2026-07-05, scrutinize-first): a typed retirement path so a v1 #[test] module can leave the debt roster three ways — migrate (existing floor-witness path), delete-as-redundant, or delete-as-low-value — instead of migrate-only.

The gap

The delete-guard (test_migration_delete_guard_holds, cli_run.rs) fail-closes: a #[test]-bearing v1 module can only be deleted once an exact-stem floor *_test.dag witness exists. That is the migrate path. It has no path for a module whose behavior is already covered by a differently-named witness (redundant) or is transient v1-Rust scaffolding (low-value) — both would trip the guard forever.

The mechanism (reuses the existing stem-glob — no new mechanism)

  • New .dag authority test.retirement.model (dag/test/retirement/model.dag):
    RetirementDisposition = DeleteRedundant { covered_by: String } | DeleteLowValue { reason: String },
    TestModuleRetirement { module, disposition }. Migrate is not a retirement row — the floor witness self-evidences it (no parallel ledger, §2).
  • A retirement is a <stem>_retired.dag declaration the delete-guard globs, symmetric with floor *_test.dag stems. Coverage = floor_stems ∪ retired_stems; the same union feeds both the debt roster (retired modules drop out → shrink-only ratchet stays valid) and the delete-guard (retired modules are deletable).
  • covered_by is fail-closed by construction (for the DeleteRedundant arm): a retirement imports the covering witness's real decl and stores its value, so a dangling ref is a compile-clean RED. DeleteLowValue { reason } is prose (unstructurable residue, DESIGN §5/§6). The DeleteRedundant arm is defined but not constructed in this PR (like RatchetForever in construction_justification, an unconstructed variant is safe); its covered_by demonstrator lands in triage tranche 1 on a genuinely fully-covered module.

Guard delta is minimal (#6046)

The cli_run.rs change is exactly a second stem source unioned into the existing covered set — test_migration_retired_stems() (glob *_retired.dag, require the file declares TestModuleRetirement so an empty stub can't silence the guard) + test_migration_covered_stems() = floor ∪ retired — and two call-sites (build_test_migration_debt_report, test_migration_delete_guard_uncovered_deletes_inner) repointed at the union. No other net-new logic.

Demonstrator: map_lookup_dual_dispatch_test.rs → DeleteLowValue

A self-declared RESIDUAL of the 5-test-migration lane: 4 of its 6 tests already migrated to dag/test/claim/map_lookup_dual_dispatch_witness_test.dag. The 2 remaining are not redundant-by-coverage (so not DeleteRedundant, per the review below): (1) an active v1-interpreter source-scan the module itself documents as "dissolving with the v1 interpreter" — a transient v1-Rust scaffold complementary to the migrated witnesses, dropped as low-value at v1 sunset; (2) an #[ignore]d inert test. Retired via dag/test/retirement/map_lookup_dual_dispatch_retired.dag with an explicit DeleteLowValue { reason }. Debt: 73 → 72 modules.

Receipts (LOCAL — CI floor is dark, 10-min timeout; operator merges on local receipts)

  • compile-clean green: gunbc compile --source-root dag --source-root src/v2 --target dag — freshly-built gunbc, 0 errors; the new dag/test/retirement/*.dag resolve/typecheck. (The stale installed /usr/local/bin/gunbc reports 2 unrelated inert_lens_* builtin-scope errors — a binary-version skew, not this change; a current-build compile is clean.)
  • guard unit tests green (cargo test -p v1-compiler --lib test_migration_debt_tests → 6 passed / 0 failed): retired_stem_is_covered_but_not_a_floor_stem (discriminating — the stem is covered only via the retirement, not any floor witness), retired_module_is_not_debt, and delete_guard_holds_with_no_v1_test_deletions_in_diff now green because the deletion of map_lookup_dual_dispatch_test.rs in origin/main...HEAD is covered by the retirement.
  • RED control (guard fail-closed): on the intermediate commit before the retirement decl was present, delete_guard_holds returned false (uncovered delete) — the guard reds without the retirement, greens with it.
  • covered_by fail-closed (DeleteRedundant arm, demonstrated in tranche 1): covered_by is bound to an imported decl, so a dangling covering import is a compile-clean resolve error (same mechanism as the two unrelated inert_lens_* not found in scope errors from the stale installed binary).

Review addressed

  • cursor/composer-2.5 REQUEST_CHANGES (valid): the demonstrator originally landed as DeleteRedundant, but the module's active source-scan test is complementary to the migrated witnesses, not covered — covered_by overstated coverage (§3/§5 semantic dilution). Fixed by reclassifying to DeleteLowValue with an explicit reason (the reviewer's first recommended option); the scan is transient v1-Rust scaffolding the module itself documents as dissolving with the v1 interpreter.

Follow-on (noted, not in this PR)

  • The 73-module triage into migrate/redundant/low-value proceeds in reviewable tranches (children), each with one-line reasons; disposition split is observable from dag/test/retirement/ (the receipt).
  • Hardening covered_by to an un-fakeable resolving reference for every row (a lens over retirement rows) is reflection-gated (gunbc#5364); today it is fail-closed at the demonstrator level + convention + review.
  • Dissolution direction (parent): when the delete-guard dissolves to a .dag lens, the per-file _retired.dag stems collapse into a roster module.

briansrls and others added 3 commits July 5, 2026 03:15
…demonstrator

Add test.retirement.model (RetirementDisposition = DeleteRedundant{covered_by}
| DeleteLowValue{reason}; TestModuleRetirement). Delete-guard gains a second
stem source: <stem>_retired.dag declarations union into the covered set feeding
both the debt roster and the delete-guard. Retire map_lookup_dual_dispatch_test.rs
(DeleteRedundant, covered by map_lookup_dual_dispatch_witness_test.dag).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…xt import)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title Test-triage lane (manager): drain v2.lens.test_migration_debt (73 modules/731 fns) with scrutinize-first policy (operator 2026-07-05): triage each module migrate vs delete-as-redundant vs delete-as-low-value BEFORE authoring witnesses; first deliverable = typed retirement path through test_migration Typed retirement path for test_migration_debt (model + guard union + first DeleteRedundant) Jul 5, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 5, 2026 04:09
briansrls and others added 2 commits July 5, 2026 04:15
Address claude-opus-4-7 review: require the constructor 'TestModuleRetirement {'
so a file merely importing the type can't silence the guard. Fix rustfmt line-wrap
that failed cargo fmt --all --check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the REQUEST_CHANGES in 93508c3 — you were right that DeleteRedundant overstated coverage. The active map_lookup_operations_do_not_probe_value_map_outside_chokepoint source-scan is complementary to the four migrated runtime witnesses, not covered by them, so claiming redundancy was §3/§5 semantic dilution. Reclassified to DeleteLowValue with an explicit reason (your first recommended option): the scan is a v1_interpreter.rs pinned-harness fact the module itself documents as "dissolving with the v1 interpreter" — transient v1-Rust scaffold, dropped as low-value at v1 sunset rather than falsely claimed covered; the #[ignore]d test is inert. The retirement model and guard union are unchanged. A genuinely-fully-covered DeleteRedundant demonstrator (exercising covered_by) lands in triage tranche 1. — sent from warm-ferret-337

@briansrls
briansrls merged commit 938358a into main Jul 5, 2026
0 of 2 checks passed
@briansrls
briansrls deleted the session/warm-ferret-337 branch July 5, 2026 04:37
briansrls added a commit that referenced this pull request Jul 5, 2026
…tirement path (delete-mass triage) (#6272)

* pipeline.rs self_gen8 cluster: retire 28 of 31 fns (typed dispositions; 3 kept for def-unification lane)

Delete-mass triage of the self_gen8 cluster per the test_migration_debt drain
(#6261 retirement path). Ground truth measured 2026-07-05 via
cargo test -p v1-compiler-tests self_gen8 -- --include-ignored: 22 passed,
9 failed - 8 of the 17 #[ignore]d fns carried stale red-on-main reasons and
pass on main today.

- 22 green fns -> DeleteRedundant: seed-corpus pattern families (homonymous
  type names, variant-specific imports, kernel-ambient types, direct type
  imports) are byte-pinned by RegenVerifyGate (regen_stage0 --verify, #5873)
  plus the emitted-seed rustc/clippy gates; beyond-corpus synthetic shapes
  (parametric-alias RHS, opaque parametric decls, proxy chains, wildcard
  imports) are executed by the v2 self-host fresh-emit lane over dag/std's
  real instances with deficits enumerated in the 1667-error receipt
  (#6253/#6258). An #[ignore]d pin runs in no gate - zero delivered signal.
- 6 red fns -> DeleteLowValue: #[ignore] since #5427, never run in any gate,
  desired-but-absent seed-emitter behavior on synthetic fixtures; deficit
  ownership is the fresh-emit lane.
- 3 red fns KEPT (stays_unemitted alias-to-opaque trio):
  dag/gunbc/plans/dag_v2_defork_audit.dag claims them for the def-unification
  lane (node://adhoc-9d2bb9c3-e7b) - premise flips, not deletes.

Typed receipt: dag/test/retirement/pipeline_self_gen8_retired.dag (two
TestModuleRetirement rows). Receipt-only w.r.t. the delete-guard - the
contributed stem pipeline_self_gen8 matches no v1 test file and pipeline.rs
itself survives, so its eventual file deletion still requires its own
coverage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Repoint kept trio's #[ignore] reasons to their owning lane (def-unification, node://adhoc-9d2bb9c3-e7b)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
gunbai-bot Bot pushed a commit that referenced this pull request Jul 5, 2026
…ment wave-1, cutover pre-reqs, CI step-budget posture)

Authority refresh after 2026-07-05's merges, ROADMAP.md regenerated via main_wet: spine marks #6255/#6262/#6243 landed and NOW = post-#6243 re-measure -> cutover #1 (pre-reqs #6243 + #6270 backfill met, defensive sweep pending); regen-cutover carrier gets the root-cause update (1482/1667 = one field_is_boxed predicate bug, receipt must be re-earned post-retraction); test-migration carrier gets #6261 + wave-1 (912->881 fns); ground truth: HAND roster 7->9 (dag_collect pair, #6262), GENERATED 92->90, CI INTERIM restated for #6273's loud step budgets. ci.yml: fold the 1-byte trailing-newline regen delta so committed == generated. All roadmap_authority_test pins verified against the regenerated projection (ALL PINS OK).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jul 5, 2026
…tirement wave-1, CI step-budget posture (#6287)

* WIP: continue work on v1 burn down

* WIP: continue work on v1 burn down

* WIP: continue work on v1 burn down

* WIP: continue work on v1 burn down

* Drop get-form revert per operator collision resolution (#6255 owns the get arm); regen ROADMAP projection

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* WIP: continue work on v1 burn down

* WIP: continue work on v1 burn down

* Fix roadmap_authority_test pins: track the 2026-07-05 ground-truth refresh (cursor RC) + repoint pre-existing-stale charter-adjacency pin

witness_b_ordered_interleaving pinned the pre-refresh prose (Ground truth 2026-07-01 date + old walls sentence); updated to the refreshed authority. Also fixed a pin this PR did NOT stale: the charter->core-design-rule adjacency has been red on main since [host-converge inventory] was appended after [charter] — repointed to the real paragraph tail. Discriminator date kept in lockstep. All pins verified against the regenerated ROADMAP.md (byte-identical projection).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* WIP: continue work on v1 burn down

* §1 roadmap receipts: today's landings (emitter mass fix #6243, retirement wave-1, cutover pre-reqs, CI step-budget posture)

Authority refresh after 2026-07-05's merges, ROADMAP.md regenerated via main_wet: spine marks #6255/#6262/#6243 landed and NOW = post-#6243 re-measure -> cutover #1 (pre-reqs #6243 + #6270 backfill met, defensive sweep pending); regen-cutover carrier gets the root-cause update (1482/1667 = one field_is_boxed predicate bug, receipt must be re-earned post-retraction); test-migration carrier gets #6261 + wave-1 (912->881 fns); ground truth: HAND roster 7->9 (dag_collect pair, #6262), GENERATED 92->90, CI INTERIM restated for #6273's loud step budgets. ci.yml: fold the 1-byte trailing-newline regen delta so committed == generated. All roadmap_authority_test pins verified against the regenerated projection (ALL PINS OK).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* WIP: continue work on v1 burn down

* Fix cursor RC on #6287: 5-dissolve-patches carrier now matches ground truth (9 HAND files / ~22.6k; dag_collect pair slotted into the drain order with its content_hash dissolution)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* WIP: continue work on v1 burn down

* Fix cursor RC round 2 on #6287: roster receipts re-grounded against the live registry authority (7 HAND / 92 GENERATED)

The 9-HAND/90-GENERATED claims described the state between #6262 and #6239 — #6239 returned the dag_collect pair to GENERATED (verified: regen_stage0.rs GENERATED includes the pair, HAND count 7, stage0_emit_model witness pins 92). Ground truth now records the full history (#6262 HAND-only -> #6239 GENERATED again), the drain carrier drops the pair as a HAND target (its content_hash grounding stays tracked by the .dag dissolve-on rows), and terminal collapse is back to 92. Consistency proven by assertion over the regenerated projection: no 90/9-file/22.6k string survives, exactly one 7-file count, pins intact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Brian Searls <briansearls1@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant